--- id: TASK-015 title: >- Make glint the editor for prose-based editor calls ($EDITOR dispatcher + per-tool) status: "\U0001F7E6 Backlog" assignee: [] created_date: '2026-06-29 16:36' updated_date: '2026-06-29 16:41' labels: - feature - release-2 dependencies: [] priority: medium ordinal: 15000 --- ## Description Adoption feature. $EDITOR is one slot for everything, so a coder keeps their code editor there — but the prose-oriented editor calls (git commit/rebase/merge/tag messages, jj describe, AND gum/huh 'open in editor' prompts, crontab -e, etc.) should be able to reach glint without taking over $EDITOR for code. There is no OS-level text-vs-code split; it must be done per-tool or via a dispatcher. Two complementary approaches, ideally both offered by a glint setup step (glint -c or a command), idempotent + reversible, documented in the README: 1) Per-tool config (precise, no extension guessing): - git: 'git config --global core.editor glint' - jj: 'jj config set --user ui.editor glint' These leave $EDITOR alone. 2) $EDITOR dispatcher wrapper (general — covers ANY tool that calls $EDITOR, including gum/huh Text fields, crontab -e): A small script set as $EDITOR that routes by the temp file's extension/name — prose (*.md, *.markdown, *.txt, *COMMIT_EDITMSG*, generic temp) -> glint; everything else -> the user's code editor (nvim/etc.). glint ships/generates the script and points $EDITOR at it. Caveat: extension-based, so tools using an unhinted generic temp name hit the fallback; huh apps can set EditorExtension('.md') but the end user doesn't control that. One-shot editor mode already works: a tool calls 'glint ', user edits, Ctrl+S saves, Ctrl+Q exits, the tool reads the saved file. Verify glint opens/edits/saves cleanly on non-.md tmpfiles (git COMMIT_EDITMSG); consider a save-on-quit safety so an unsaved message isn't silently empty. Positioning: glint is the terminal WRITING app owning prose edits, not the universal default editor. ## Acceptance Criteria - [ ] #1 A glint command / config step sets git core.editor (and jj ui.editor) to glint, leaving $EDITOR untouched - [ ] #2 It is idempotent and offers an undo/unset - [ ] #3 glint opens, edits, and saves cleanly when invoked one-shot on a non-.md tmpfile (e.g. git COMMIT_EDITMSG) - [ ] #4 README documents the manual git/jj one-liners - [ ] #5 glint setup can install a $EDITOR dispatcher wrapper that routes prose temp files to glint and code to the user's editor (covers gum/huh, crontab, git)